<template>
  <button class="btn" @click="clear"> 归 0</button>
  <div class=" h-screen w-screen flex items-center justify-center text-white bg-blue text-center text-5xl" @click="inc">
    {{ counter.count }}
  </div>
</template>

<script setup lang="ts">
import { useCounterStore } from '@/stores/counter';
const counter = useCounterStore()

const inc = () => {
  counter.count += 1
}

const clear = () => {
  counter.count = 0
}
</script>

<style scoped>

</style>